const Controller = require('egg').Controller;

class AuthdvController extends Controller{
    // 获取权限数据
    async index(){
        const {ctx}=this
        const {id}=ctx.request.query
        const result=await ctx.service.authDV.index(id)
        if(result.length){
            ctx.body={
                code:"1001",
                msg:"权限数据获取成功",
                result
            }
        }else{
            ctx.body={
                code:"1002",
                msg:"权限数据获取失败"
            }
        }
    }
}

module.exports=AuthdvController